<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/11/3 0003
 * Time: 下午 8:26
 */

namespace app\controller;


use think\Request;

class Replay
{

    function index(Request $request){

        //return json($request->get());
        //$data = file_get_contents('php://input');
        //print_r($data);
        //return $request['name'];
        //return $request->param("name");

        //return $request->param("name");
        //print_r(request()->action());
        //print_r( \think\facade\Request::has("name","get"));
        //dd( $request->has("city","get"));
        //print_r($request->file("xxx")->move("./abc".$request->file("xxx")->getBasename()));

        //return json( $request->param(["name"]));

        //限制参数类型
       // dump($request->param("age/d"));
        //dump($request->param("age","100"));
        //dump($request->param("age","100","strtoupper,htmlspecialchars"));
        //dump(input("?get.name"));
        //dump(input("?get.xxx"));
        //dump(input("?param.age"));

        //dump($request->except(["name"]));

        //dump($request->isAjax());
        //dd($request->isGet());
        return "index".session("name");
    }

    function get($id){

        //dd(request()->ext());
        //return $id;

        //return json(["ok"])->code(200);
        //return response("dfdsf");
        //return redirect("/replay/index")->with(["name"=>"cao"]);
        return redirect(url("replay/index"))->with(["name"=>"cao"]);
    }

}